package com.dense.kuiniu.floatcabinet.mvp.http.entity;

import android.os.Parcel;

/**
 * @author Administrator
 * @date 2020/8/21
 */
public class StateBook extends Book{
    private boolean isChecked ;

    public boolean isChecked() {
        return isChecked;
    }

    public void setChecked(boolean checked) {
        isChecked = checked;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        super.writeToParcel(dest, flags);
        dest.writeByte(this.isChecked ? (byte) 1 : (byte) 0);
    }

    public StateBook() {
    }

    protected StateBook(Parcel in) {
        super(in);
        this.isChecked = in.readByte() != 0;
    }

    public static final Creator<StateBook> CREATOR = new Creator<StateBook>() {
        @Override
        public StateBook createFromParcel(Parcel source) {
            return new StateBook(source);
        }

        @Override
        public StateBook[] newArray(int size) {
            return new StateBook[size];
        }
    };
}